import request from '@/utils/request'
// import qs from 'qs'

export const getResourcePages = (data: any) =>
  request({
    method: 'POST',
    url: '/boss/resource/getResourcePages',
    data
  })

export const getAll = () =>
  request({
    method: 'get',
    url: '/boss/resource/category/getAll'
  })

export const saveOrUpdate = (data: any) =>
  request({
    method: 'post',
    url: '/boss/resource/saveOrUpdate',
    data
  })

export const resourceDelete = (id: string|number) =>
  request({
    method: 'delete',
    url: `/boss/resource/${id}`
  })

export const categoryGetAll = () =>
  request({
    method: 'get',
    url: '/boss/resource/category/getAll'
  })

export const saveOrderUpdate = (data: any) =>
  request({
    method: 'post',
    url: '/boss/resource/category/saveOrderUpdate',
    data
  })

export const categoryDelete = (id: string|number) =>
  request({
    method: 'delete',
    url: `/boss/resource/category/${id}`
  })
